﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Xml.Linq;

namespace OurMemory
{
    public partial class FormCreateOF : Form
    {
        private readonly OurFavorServices service = new OurFavorServices();
        public FormCreateOF()
        {
            InitializeComponent();
        }

        private void btnOk_Click(object sender, EventArgs e)
        {
            OurFavorCreateModel model = new OurFavorCreateModel()
            {
                Who = textWho.Text,
                Wishes = textWishes.Text,
                Favor = textFavor.Text,
                Photo = textPhoto.Text,
                
            };
            service.Create(model);
            this.DialogResult = DialogResult.OK;
            this.Close();
        }
    }
}
